package com.peng.rpc.exception;

import com.peng.rpc.enumeration.RpcError;

/**
 * 错误异常类
 * @author Wonderson
 * @email wpp.ds@foxmail.com
 * @date 2022/2/28 19:18
 */
public class RpcException extends RuntimeException{

    public RpcException(RpcError rpcError) {
        super(rpcError.getMessage());
    }

    public RpcException(RpcError rpcError, String detail) {
        super(rpcError.getMessage() + " : " + detail);
    }

    public RpcException(String message, Throwable cause) {
        super(message, cause);
    }

}
